// console.log('init background.js')
// chrome.action.onClicked.addListener((tab) => {
//     chrome.scripting.executeScript({
//         target: { tabId: tab.id },
//         files: ['content-script.js']
//     });
// });

// -----[service worker].js-----
// 监听消息接收
// @ts-ignore
// chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
    // chrome.tabs.query({active: true, currentWindow: true}, function (tabs) {
    //     // @ts-ignore
    //     chrome.tabs.sendMessage(tabs[0].id,{number: request.number + 1},(response) => {
    //         console.log(
    //             `background -> content script infos have been received. number: ${response.number}`
    //         );
    //     });
    // });
    // // 消息回传
    // sendResponse({number: request.number});
// });
